package com.topfinance.payment.ebo;

// Generated 2011-1-9 9:12:59 by Hibernate Tools 3.4.0.Beta1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.topfinance.cnaps2.ebo.ConfOutPortEbo;

/**
 * TCfgRouteRule generated by hbm2java
 */
@Entity
@Table(name = "T_CFG_ROUTE_RULE")
public class TCfgRouteRuleEbo implements java.io.Serializable {

	private Integer oid;

	//输出端口
	private TCfgPortOutEbo TCfgPortOut;

	//名称
	private String name;

	//顺序号
	private long sequn;

	//操作匹配
	private String operationmask;

	//方向
	private String direction;

	public TCfgRouteRuleEbo() {
	}

	public TCfgRouteRuleEbo(Integer oid, long sequn) {
		this.oid = oid;
		this.sequn = sequn;
	}

	public TCfgRouteRuleEbo(Integer oid, TCfgPortOutEbo TCfgPortOut, String name, long sequn, String operationmask,
			String direction) {
		this.oid = oid;
		this.TCfgPortOut = TCfgPortOut;
		this.name = name;
		this.sequn = sequn;
		this.operationmask = operationmask;
		this.direction = direction;
	}

	@Id
	@Column(name = "OID", unique = true, nullable = false, precision = 10, scale = 0)
	@SequenceGenerator(name = "CFG_SEQUNCE_GEN", sequenceName = "S_CFG_SEQUNCE")
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "CFG_SEQUNCE_GEN")	
	public Integer getOid() {
		return this.oid;
	}

	public void setOid(Integer oid) {
		this.oid = oid;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "OUTPORT_ID")
	public TCfgPortOutEbo getTCfgPortOut() {
		return this.TCfgPortOut;
	}

	public TCfgPortOutEbo setTCfgPortOut(TCfgPortOutEbo po) {
		return this.TCfgPortOut = po;
	}

	@Column(name = "NAME", length = 80)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "SEQUN", nullable = false, precision = 10, scale = 0)
	public long getSequn() {
		return this.sequn;
	}

	public void setSequn(long sequn) {
		this.sequn = sequn;
	}

	@Column(name = "OPERATIONMASK", length = 120)
	public String getOperationmask() {
		return this.operationmask;
	}

	public void setOperationmask(String operationmask) {
		this.operationmask = operationmask;
	}

	@Column(name = "DIRECTION", length = 1)
	public String getDirection() {
		return this.direction;
	}

	public void setDirection(String direction) {
		this.direction = direction;
	}

}
